As a background technique of the technical field of the invention, International Publication WO/2015/159792 (Patent Literature 1) is known. The publication has a description “proposed is a charged particle beam device comprising: at least two detectors to detect charged particles, obtained based on irradiation of a charged particle beam emitted from a charged particle source; and an image processing device to process an image, formed based on output from the detectors, wherein the image processing device performs masking on an edge region of images obtained based on the charged particles obtained with the two or more detectors, and performs difference operation on the two or more images. Further proposed is a charged particle beam device that performs matching or the like using the images subjected to the marking.”
Patent Literature 1 discloses a charged particle beam device in which an edge region of an image of an imaging object pattern is determined by difference operation with respect to two or more images obtained with at least two detectors for detection of charged particles, and pattern alignment is performed. However, in the processing in Patent Literature 1, it is not possible to properly determine a step of a step pattern (a pattern with a step formed with a projection and a groove such as a line, a hole and the like (hereinbelow, referred to as a “step pattern”)) as an imaging object in accordance with combination of materials of the groove and the projection of the pattern, and in such case, the pattern alignment fails.